/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * HomePage.java
 *
 * Created on 29 janv. 2012, 21:17:30
 */

package longprojectihm;

/**
 *
 * @author haythem
 */
public class HomePage extends javax.swing.JFrame {

    /** Creates new form HomePage */
    public HomePage() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        fileChooserPanel = new javax.swing.JFileChooser();
        newLogPanel = new javax.swing.JPanel();
        addEventButton = new javax.swing.JButton();
        editEventButton = new javax.swing.JButton();
        deleteEventButton = new javax.swing.JButton();
        cancelNewLog = new javax.swing.JButton();
        validateNewLog = new javax.swing.JButton();
        caseListPanel = new javax.swing.JScrollPane();
        caseListTree = new javax.swing.JTree();
        EnterLine = new javax.swing.JPanel();
        caseLabel = new javax.swing.JLabel();
        performatifLAbel = new javax.swing.JLabel();
        taskLabel = new javax.swing.JLabel();
        actorLabel = new javax.swing.JLabel();
        receiverLabel = new javax.swing.JLabel();
        dateLabel = new javax.swing.JLabel();
        cancelLine = new javax.swing.JButton();
        vaidateLine = new javax.swing.JButton();
        caseText = new javax.swing.JTextField();
        perfText = new javax.swing.JTextField();
        taskText = new javax.swing.JTextField();
        actorText = new javax.swing.JTextField();
        receiverText = new javax.swing.JTextField();
        dateText = new javax.swing.JTextField();
        HomePageFrame = new javax.swing.JPanel();
        openExistingFile = new javax.swing.JRadioButton();
        createNewFile = new javax.swing.JRadioButton();
        validateHP = new javax.swing.JButton();
        exitHP = new javax.swing.JButton();

        addEventButton.setText("Add Event");

        editEventButton.setText("Edit Event");

        deleteEventButton.setText("Delete Event");

        cancelNewLog.setText("Cancel");

        validateNewLog.setText("Validate");

        caseListPanel.setViewportView(caseListTree);

        org.jdesktop.layout.GroupLayout newLogPanelLayout = new org.jdesktop.layout.GroupLayout(newLogPanel);
        newLogPanel.setLayout(newLogPanelLayout);
        newLogPanelLayout.setHorizontalGroup(
            newLogPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, newLogPanelLayout.createSequentialGroup()
                .add(22, 22, 22)
                .add(caseListPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 265, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 93, Short.MAX_VALUE)
                .add(newLogPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                    .add(deleteEventButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(editEventButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(addEventButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .add(65, 65, 65))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, newLogPanelLayout.createSequentialGroup()
                .addContainerGap(338, Short.MAX_VALUE)
                .add(validateNewLog)
                .add(36, 36, 36)
                .add(cancelNewLog)
                .add(30, 30, 30))
        );
        newLogPanelLayout.setVerticalGroup(
            newLogPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(newLogPanelLayout.createSequentialGroup()
                .add(36, 36, 36)
                .add(addEventButton)
                .add(38, 38, 38)
                .add(editEventButton)
                .add(33, 33, 33)
                .add(deleteEventButton)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 97, Short.MAX_VALUE)
                .add(newLogPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(cancelNewLog)
                    .add(validateNewLog))
                .add(57, 57, 57))
            .add(newLogPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(caseListPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 239, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(103, Short.MAX_VALUE))
        );

        caseLabel.setText("Case");

        performatifLAbel.setText("Performatif");

        taskLabel.setText("Task");

        actorLabel.setText("Actor");

        receiverLabel.setText("Receiver");

        dateLabel.setText("Date");

        cancelLine.setText("Cancel");

        vaidateLine.setText("Validate");

        caseText.setText("enter your case name");

        perfText.setText("enter your performatif");

        taskText.setText("enter your task name");

        actorText.setText("enter the actor (initiator)");

        receiverText.setText("enter the receiver");

        dateText.setText("enter the Date (automatic)");

        org.jdesktop.layout.GroupLayout EnterLineLayout = new org.jdesktop.layout.GroupLayout(EnterLine);
        EnterLine.setLayout(EnterLineLayout);
        EnterLineLayout.setHorizontalGroup(
            EnterLineLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(EnterLineLayout.createSequentialGroup()
                .add(21, 21, 21)
                .add(EnterLineLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(caseLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 57, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(performatifLAbel)
                    .add(taskLabel)
                    .add(actorLabel)
                    .add(receiverLabel)
                    .add(dateLabel))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(EnterLineLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(dateText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                    .add(receiverText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                    .add(actorText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                    .add(perfText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, caseText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, taskText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE))
                .add(182, 182, 182))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, EnterLineLayout.createSequentialGroup()
                .addContainerGap(171, Short.MAX_VALUE)
                .add(vaidateLine)
                .add(52, 52, 52)
                .add(cancelLine)
                .add(38, 38, 38))
        );
        EnterLineLayout.setVerticalGroup(
            EnterLineLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(EnterLineLayout.createSequentialGroup()
                .add(23, 23, 23)
                .add(EnterLineLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(caseLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(caseText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(18, 18, 18)
                .add(EnterLineLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(performatifLAbel)
                    .add(perfText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(18, 18, 18)
                .add(EnterLineLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(taskLabel)
                    .add(taskText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(18, 18, 18)
                .add(EnterLineLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(actorLabel)
                    .add(actorText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(18, 18, 18)
                .add(EnterLineLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(receiverLabel)
                    .add(receiverText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(18, 18, 18)
                .add(EnterLineLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(dateLabel)
                    .add(dateText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 92, Short.MAX_VALUE)
                .add(EnterLineLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(cancelLine)
                    .add(vaidateLine))
                .add(65, 65, 65))
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        openExistingFile.setText("Open Existing Log File");

        createNewFile.setText("Create New Log File");

        validateHP.setText("Validate");

        exitHP.setText("Exit");
        exitHP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitHPActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout HomePageFrameLayout = new org.jdesktop.layout.GroupLayout(HomePageFrame);
        HomePageFrame.setLayout(HomePageFrameLayout);
        HomePageFrameLayout.setHorizontalGroup(
            HomePageFrameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(HomePageFrameLayout.createSequentialGroup()
                .add(134, 134, 134)
                .add(validateHP)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 54, Short.MAX_VALUE)
                .add(exitHP)
                .add(70, 70, 70))
            .add(HomePageFrameLayout.createSequentialGroup()
                .add(61, 61, 61)
                .add(HomePageFrameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(createNewFile)
                    .add(openExistingFile))
                .addContainerGap(188, Short.MAX_VALUE))
        );
        HomePageFrameLayout.setVerticalGroup(
            HomePageFrameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(HomePageFrameLayout.createSequentialGroup()
                .add(71, 71, 71)
                .add(openExistingFile)
                .add(28, 28, 28)
                .add(createNewFile)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 59, Short.MAX_VALUE)
                .add(HomePageFrameLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(validateHP)
                    .add(exitHP))
                .add(51, 51, 51))
        );

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(HomePageFrame, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(HomePageFrame, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void exitHPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitHPActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_exitHPActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new HomePage().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel EnterLine;
    private javax.swing.JPanel HomePageFrame;
    private javax.swing.JLabel actorLabel;
    private javax.swing.JTextField actorText;
    private javax.swing.JButton addEventButton;
    private javax.swing.JButton cancelLine;
    private javax.swing.JButton cancelNewLog;
    private javax.swing.JLabel caseLabel;
    private javax.swing.JScrollPane caseListPanel;
    private javax.swing.JTree caseListTree;
    private javax.swing.JTextField caseText;
    private javax.swing.JRadioButton createNewFile;
    private javax.swing.JLabel dateLabel;
    private javax.swing.JTextField dateText;
    private javax.swing.JButton deleteEventButton;
    private javax.swing.JButton editEventButton;
    private javax.swing.JButton exitHP;
    private javax.swing.JFileChooser fileChooserPanel;
    private javax.swing.JPanel newLogPanel;
    private javax.swing.JRadioButton openExistingFile;
    private javax.swing.JTextField perfText;
    private javax.swing.JLabel performatifLAbel;
    private javax.swing.JLabel receiverLabel;
    private javax.swing.JTextField receiverText;
    private javax.swing.JLabel taskLabel;
    private javax.swing.JTextField taskText;
    private javax.swing.JButton vaidateLine;
    private javax.swing.JButton validateHP;
    private javax.swing.JButton validateNewLog;
    // End of variables declaration//GEN-END:variables

}
